<?
include('../seguridad.php');
include('../bd.php');
Conectar();
if($_POST[borrar]!='yes'){
$color=strtolower($_POST[color]);
$color=ucfirst($color);
$sql = "UPDATE color SET color='".$color."' WHERE id='".$_POST[id]."'";
mysql_query($sql) or die(mysql_error());
}else if($_POST[borrar]=="yes"){
$sql = "DELETE FROM color WHERE id='".$_POST[id]."'";
mysql_query($sql) or die(mysql_error());
}
Desconectar();
header('Location: ../products_color.php');
?>